import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/views/login.vue'
import Home from '../components/views/home.vue'
import Welcome from '../components/Welcome.vue'
import User from '../components/User.vue'
import Rights from '../components/Rights.vue'
import Roles from '../components/Roles.vue'
import forgetPass from '../components/views/forgetPass.vue'
import registerUser from '../components/views/registerUser.vue'

Vue.use(Router)

export default new Router({
  routes: [
    { path: '/', redirect: '/Login' },
    { path: '/login', component: Login }, 
    { path: '/forgetPass', component: forgetPass }, 
    { path: '/registerUser', component: registerUser }, 
    {
      path: '/home',
      component: Home,
      redirect:'/welcome',
      children:[
        {path:'/welcome',component:Welcome},
        {path:'/user',component:User},
        {path:'/rights',component:Rights},
        {path:'/roles',component:Roles}
      ]
  }
  ]
})
